
#include <iostream>
using namespace std;


template<typename T> class Base{
public:
	virtual void foo(){
		cout << "Base<T>::foo()" << endl;
	}
//	virtual template<typename M> void Func(){}	err
};

template<typename T, typename D> class Derived : public Base<T>{
public:
	void foo(){
		cout << "Derived<T, D>::foo()" << endl;
	}
};

int main(){
	Derived<int, double> d;
	Base<int>* pBase = &d;
	pBase->foo();

	return 0;
}
